<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>权限列表</title>

    <include file="Base:header_js" />

    <style type="text/css">
        body{
            font-family: "微软雅黑",Helvetica,Tahoma,Arial,sans-serif;
        }

    </style>
</head>


<body>

    <div id="wrapper">

        <nav class="navbar-default navbar-static-side" role="navigation">
            <include file="Base:left_nav" />
        </nav>

        <div id="page-wrapper" class="gray-bg">
        <div class="row border-bottom">
            <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0;">
                <include file="Base:header" />
            </nav>

        </div>

        <div class="wrapper  animated fadeInRight">
            <br/>
            <div class="row">
                <div class="col-lg-12">
                    <div class="ibox float-e-margins">
                        <div class="ibox-content">
                            <form method="post" class="form-horizontal" action="__SELF__">
                               
                                <table class="table table-striped table-bordered table-hover " id="editable" >
                                    <thead>
                                        <tr>
                                            <th>用户组</th>
                                            <th>描述</th>
                                            <th>状态</th>
                                            <th>授权</th>
                                            <th>开启禁用操作</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <volist name="data" id="vo"  >
                                            <tr class="gradeX " >
                                                <td class="center" width="10%">{$vo.title}</td>
                                                <td class="center" width="10%">{$vo.description}</td>
                                                <td class="center" width="10%">{$vo.status}</td>
                                                <td class="center" width="15%">
                                                    <button class="btn btn-info btn-xs " type="button"><i class="fa fa-paste"></i> 权限管理</button>
                                                </td>
                                                <td class="center" width="15%">
                                                    <div class="switch">
                                                        <div class="onoffswitch">
                                                            <input checked="" class="onoffswitch-checkbox" id="example1" type="checkbox">
                                                            <label class="onoffswitch-label" for="example1">
                                                                <span class="onoffswitch-inner"></span>
                                                                <span class="onoffswitch-switch"></span>
                                                            </label>
                                                        </div>
                                                    </div>
                                                </td>
                                            </tr>
                                            </div>
                                        </volist>   
                                    </tbody>
                                </table>
                               
                                <div class="form-group">
                                    <div class="col-sm-4 col-sm-offset-2">
                                        <button class="btn btn-primary" type="submit">保存</button>
                                        <button class="btn btn-white" type="submit">返回</button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
         <include file="Base:footer" />

        </div>
        </div>
    <include file="Base:footer_js" />
    <script type="text/javascript" src="__ADMIN_JS__/message.js"></script>
    <script type="text/javascript">
        $("form").submit(function(){
            var self = $(this);
            $.post(self.attr("action"), self.serialize(), success, "json");
            return false;

            function success(data){
                if(data.status){
                    var msg = new $.Messager(data.info, {type:'success' ,placement: 'center',time: 1000});
                    msg.show();
                    window.location.href = data.url;
                } else {
                    // var msg = new $.Messager(data.info, {placement: 'center',time: 1000});
                    // msg.show();
                    showMsg(data.info,data.url,'',2000);
                }
            }

            function showMsg(info , url , option ,time) {
                if(!option) {
                    option = {type: "default"};
                }
                var msg = new $.Messager(info, {type:option.type,placement: 'center',time: 1000});
                msg.show();
                setTimeout("location.href= '" + url + "';", 1000);  
            }
        });
    </script>
    <script type="text/javascript">

    </script>
</body>

</html>
